package cn.zl.test.asm.generate;

import cn.yunbamboos.rest.service.IBeanInvoke;
import cn.yunbamboos.rest.service.dto.in.BaseInDTO;
import cn.zl.web.dto.devicechannel.PlayDeviceChannelInDTO;
import cn.zl.web.dto.login.LoginInDTO;
import cn.zl.web.inter.devicechannel.IDeviceChannelService;
import cn.zl.web.inter.login.ILoginService;

import java.util.ArrayList;
import java.util.List;

public class ILoginService_loginDemo implements IBeanInvoke {

    private final Object bean;

    public ILoginService_loginDemo(Object bean) {
        this.bean = bean;
    }

    @Override
    public Object invoke(BaseInDTO baseInDTO) throws Exception {
        ILoginService service = (ILoginService) bean;
        LoginInDTO in = (LoginInDTO) baseInDTO;
        return service.login(in);
    }

    private List<ILoginService> getLoginServiceList() {
        List<ILoginService> list = new ArrayList<>();
        return list;
    }

    private Object call(BaseInDTO baseInDTO){
        IDeviceChannelService service = (IDeviceChannelService) bean;
        PlayDeviceChannelInDTO in = (PlayDeviceChannelInDTO) baseInDTO;
        return service.playStream(in);
    }

}
